import { NgModule } from '@angular/core';

import {CommonModule, HashLocationStrategy, LocationStrategy, registerLocaleData} from '@angular/common';
import zh from '@angular/common/locales/zh';
import { NzLayoutModule } from 'ng-zorro-antd/layout';
import { NzMenuModule } from 'ng-zorro-antd/menu';
import {NzIconModule} from "ng-zorro-antd/icon";

import { IconDefinition } from '@ant-design/icons-angular';
import { HTTP_INTERCEPTORS} from "@angular/common/http";

import { AccountBookFill, AlertFill, AlertOutline } from '@ant-design/icons-angular/icons';
const icons: IconDefinition[] = [ AccountBookFill, AlertOutline, AlertFill ];

registerLocaleData(zh);

import {MainRoutingModule} from "./main-routing.module";
import {MainComponent} from "./main.component";
import {NzDividerModule} from "ng-zorro-antd/divider";
import {NzButtonModule} from "ng-zorro-antd/button";
import {NzModalModule} from "ng-zorro-antd/modal";
import {NzTableModule} from "ng-zorro-antd/table";
import {FormsModule, ReactiveFormsModule} from "@angular/forms";
import {NzInputModule} from "ng-zorro-antd/input";
import {NzProgressModule} from "ng-zorro-antd/progress";
import {NzPopconfirmModule} from "ng-zorro-antd/popconfirm";
import {NzAvatarModule} from "ng-zorro-antd/avatar";
import {NzSwitchModule} from "ng-zorro-antd/switch";
import {NzDrawerModule} from "ng-zorro-antd/drawer";
import {NzSpinModule} from "ng-zorro-antd/spin";
import {NzImageModule} from "ng-zorro-antd/image";
import {NzToolTipModule} from "ng-zorro-antd/tooltip";
import {NzEmptyModule} from "ng-zorro-antd/empty";
import {NzGridModule} from "ng-zorro-antd/grid";
import {NzBadgeModule} from "ng-zorro-antd/badge";
import {NzPopoverModule} from "ng-zorro-antd/popover";
import {HeroInterceptor} from "../../service/http/hero.interceptor";
import {NzFormModule} from "ng-zorro-antd/form";
import {NzMessageModule} from "ng-zorro-antd/message";
import {NzRadioModule} from "ng-zorro-antd/radio";
import {NzStatisticModule} from "ng-zorro-antd/statistic";

@NgModule({

  imports: [
    CommonModule,
    FormsModule,
    ReactiveFormsModule,
    MainRoutingModule,
    NzInputModule,
    NzProgressModule,
    NzPopconfirmModule,
    NzAvatarModule,
    NzSwitchModule,
    NzModalModule,
    NzIconModule,
    NzDrawerModule,
    NzButtonModule,
    NzSpinModule,
    NzImageModule,
    NzMenuModule,
    NzToolTipModule,
    NzIconModule.forRoot(icons),
    NzEmptyModule,
    NzTableModule,
    NzGridModule,
    NzDividerModule,
    NzBadgeModule,
    NzPopoverModule,
    NzLayoutModule,
    NzFormModule,
    NzMessageModule,
    NzRadioModule,
    NzStatisticModule,

  ],

  providers: [
    { provide: HTTP_INTERCEPTORS, useClass: HeroInterceptor, multi: true },
    {provide:LocationStrategy, useClass:HashLocationStrategy}],
  declarations: [
    MainComponent,
  ],
})
export class MainModule { }
